<?php $this->load->view('admin/public/head.html', array('css' => array(
'/assets/admin/css/admin/common.css'
))); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper searchAdmin" ng-controller="admin-system-search-controller">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            商城管理
            <small>设置统计热搜关键词</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 商城管理</a></li>
            <li class="active">搜索设置</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">

        <!-- Your Page Content Here -->
        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    <div class="box-header with-border">
                        <h3 class="box-title">热搜词设置</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <form class="form-horizontal">
                            <div class="box-body">
                                <div class="form-group">
                                    <div class="col-sm-4">
                                        <input type="text" class="form-control" ng-model="add.keyword" placeholder="填写关键词">
                                    </div>
                                    <div class="col-sm-2">
                                        <input type="text" class="form-control" ng-model="add.times" placeholder="填写默认次数">
                                    </div>
                                    <div class="col-sm-3"><a href="javascript:;" ng-click="addKeyword()" style="background: #00a65a; border: none;" class="btn btn-info">添加</a></div>
                                </div>
                            </div>

                            <table class="table table-bordered keyword-lists">
                                <tr>
                                    <th style="width: 30px" class="text-center">#</th>
                                    <th class="text-center">分类名称</th>
                                    <th class="text-center">次数</th>
                                    <th style="width: 60px" class="text-center">操作</th>
                                </tr>
                                <tr ng-repeat="(index, l) in lists">
                                    <td class="text-center" ng-bind="l.id"></td>
                                    <td class="text-center">
                                        <input type="text" ng-blur="resetKeyword(index, l.id, l.keyword)" class="form-control input-sm" ng-model="l.keyword" style="width: 70%">
                                    </td>
                                    <td class="text-center">
                                        <input type="text" ng-model="l.times" ng-blur="resetTimes(index, l.id, l.times)" class="form-control input-sm" style="width: 50px;">
                                    </td>
                                    <td class="text-center">
                                        <a href="javascript:;" class="btn btn-link btn-sm" ng-click="removeItem(index, l.id)">删除</a>
                                    </td>
                                </tr>
                                <tr ng-show="!lists.length">
                                    <td colspan="4">
                                        <p class="text-center help-block" style="padding: 0; margin: 0;">暂无数据</p>
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </div>
                    <div ng-show="showNextPage">
                        <p class="text-center">
                            <button ng-click="loadMore()" style="margin-bottom: 20px; border: 1px solid #337ab7;" class="btn btn-link">加载更多</button>
                        </p>
                    </div>
                </div>
                <!-- /.box -->
            </div>
        </div>
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php $this->load->view('admin/public/foot.html', array('js' => array(
'/assets/admin/js/system/search.js'
))); ?>
